package com.htu.controller;

import com.htu.po.Business;
import com.htu.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@ResponseBody
@RequestMapping("/BusinessController")
public class BusinessController {
    @Autowired
    private BusinessService businessService;

    @RequestMapping("/getBusinessById")
    public Business getBusinessById(Integer businessId) {
        return businessService.getBusinessById(businessId);
    }

    @RequestMapping("/listBusinessByOrderTypeId")
    public List<Business> listBusinessByOrderTypeId(Integer orderTypeId){
        return businessService.listBusinessByOrderTypeId(orderTypeId);
    }
}